(function() {

  describe('User routes', function() {
    var location;
    location = null;
    beforeEach(function() {
      return location = document.location.pathname;
    });
    afterEach(function() {
      Backbone.history.navigate(location);
      return Backbone.history.stop();
    });
    it('should by CreateUser route', function() {
      var router;
      spyOn(AdminUserRoutes.prototype, "Create");
      router = new AdminUserRoutes();
      Backbone.history.start({
        silent: true,
        pushState: true
      });
      router.navigate("Users/Create", true);
      expect(AdminUserRoutes.prototype.Create).toHaveBeenCalled();
    });
    it('should by EditUser route', function() {
      var router;
      spyOn(AdminUserRoutes.prototype, "Edit");
      router = new AdminUserRoutes();
      Backbone.history.start({
        silent: true,
        pushState: true
      });
      router.navigate("Users/Edit?userId=1", true);
      expect(AdminUserRoutes.prototype.Edit).toHaveBeenCalledWith("?userId=1");
    });
    return it('should by ListinUser route', function() {
      var router;
      spyOn(AdminUserRoutes.prototype, "Listing");
      router = new AdminUserRoutes();
      Backbone.history.start({
        silent: true,
        pushState: true
      });
      router.navigate("Users", true);
      expect(AdminUserRoutes.prototype.Listing).toHaveBeenCalled();
      router.navigate("Users/Index", true);
      expect(AdminUserRoutes.prototype.Listing).toHaveBeenCalled();
      router.navigate("Users/Listing", true);
      expect(AdminUserRoutes.prototype.Listing).toHaveBeenCalled();
      router.navigate("Users/Listing?column=1", true);
      expect(AdminUserRoutes.prototype.Listing).toHaveBeenCalled();
    });
  });

}).call(this);
